Re-enable Microsoft.Extensions.Hosting FunctionalTests/TestApp shutdown coverage across local and Helix environments#128252
Conversation
Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/f2762648-8aaf-44cd-a0bb-269b2a6b371d Co-authored-by: rosebyte <14963300+rosebyte@users.noreply.github.com>
|
@copilot , the shutdown tests are failing with this error on helix machines: Comments Error message Stack trace |
Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/e8bb9c1b-1794-4ebc-a563-bec6823fec1c Co-authored-by: rosebyte <14963300+rosebyte@users.noreply.github.com>
... Fixed in b9cd702. I removed the source-tree lookup and switched the shutdown tests to run TestApp from the deployed test output ( |
|
@copilot , this time it failed with this error: Test Failures (700 tests failed) ❌ Microsoft.AspNetCore.Hosting.FunctionalTests.ShutdownTests.ShutdownTestRun [Console] [Details] [Artifacts] [0.70% failure rate] |
Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/a1953635-73f1-414e-9fc3-75367c72699e Co-authored-by: rosebyte <14963300+rosebyte@users.noreply.github.com>
Fixed in 609f415. I updated Hosting FunctionalTests process cleanup to handle environments where |
|
@copilot , now the error is this: Test Failures (700 tests failed) ❌ Microsoft.AspNetCore.Hosting.FunctionalTests.ShutdownTests.ShutdownTestRun [Console] [Details] [Artifacts] [0.79% failure rate] |
|
@copilot fix it (the previous post with the error) |
Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/553de7ef-ead5-4cc6-adbb-ff2eda8d0c24 Co-authored-by: rosebyte <14963300+rosebyte@users.noreply.github.com>
Fixed in 3599810. I removed the Unix cleanup dependency on the external
Addressed in 3599810 with the same fix: process termination no longer shells out to |
|
@copilot , now the error is this (I suspect we're now running in a circle, don't we?):[All failing tests from runtime] ❌ Microsoft.AspNetCore.Hosting.FunctionalTests.ShutdownTests.ShutdownTestRun [Console] [Details] [Artifacts] [0.87% failure rate] |
This one is from an older PR merge snapshot ( |
There was a problem hiding this comment.
Pull request overview
This PR re-enables the Microsoft.Extensions.Hosting functional shutdown coverage by removing the CI skip/ActiveIssue gates and updating the functional-test deployment/cleanup logic to work in environments where source/layout or common Unix tools may not be available (e.g., Helix/minimal images).
Changes:
- Reworks
ShutdownTestsdeployment to run the TestApp from the existing test output directory via a customApplicationPublisher. - Re-enables the functional test project in CI by removing
IgnoreForCIand the assembly-levelActiveIssue. - Improves Unix process-tree cleanup resiliency by tolerating missing
pgrepand avoiding reliance on an externalkillbinary.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/ShutdownTests.cs | Deploys TestApp from AppContext.BaseDirectory and adds an ExistingOutputApplicationPublisher to avoid source-based publishing. |
| src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/Properties/AssemblyInfo.cs | Removes assembly-level ActiveIssue attribute to re-enable tests. |
| src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/Microsoft.Extensions.Hosting.Functional.Tests.csproj | Removes IgnoreForCI so the test project runs in CI again. |
| src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/ProcessExtensions.cs | Makes Unix child-process enumeration tolerant of missing pgrep and replaces external kill invocation with Process.GetProcessById(...).Kill(). |
| ApplicationName = "Microsoft.Extensions.Hosting.TestApp", | ||
| TargetFramework = $"net{version.Major}.{version.Minor}", | ||
| ApplicationType = ApplicationType.Portable, | ||
| PublishApplicationBeforeDeployment = true, | ||
| PreservePublishedApplicationForDebugging = true, | ||
| StatusMessagesEnabled = false | ||
| }; | ||
| deploymentParameters.ApplicationPublisher = new ExistingOutputApplicationPublisher(applicationPath); |
| @@ -3,8 +3,6 @@ | |||
| <PropertyGroup> | |||
| <TargetFrameworks>$(NetCoreAppCurrent);$(NetFrameworkCurrent)</TargetFrameworks> | |||
| <EnableDefaultItems>true</EnableDefaultItems> | |||
Uh oh!
There was an error while loading. Please reload this page.